Moving picture prediction method, moving picture coding method and apparatus, and moving picture decoding method and apparatus

ABSTRACT

An image decoding method is provided which includes a time information determination step of determining time information of a current picture, a first reference picture referred to by the current picture and a second reference picture referred to by the current picture; a scaling parameter calculation step of calculating a scaling parameter based on a time distance between the first reference picture and a second reference picture; a weighting coefficient determination step of determining two weighting coefficients based on the scaling parameter; a predictive pixel value generation step of generating a predictive pixel value of the current picture by scaling a pixel value of the first reference picture and a pixel value of the second reference picture using the two weighting coefficients determined in the weighting coefficient determination step; and a decoding step of decoding the current picture using the predictive pixel value.

TECHNICAL FIELD

The present invention relates to a prediction method of a pixel value ina moving picture, and particularly to a prediction method for performingtemporally scaling processing based on two pictures.

BACKGROUND ART

Generally in moving picture coding, the amount of information iscompressed using redundancy in spatial direction and temporal directionthat a moving picture has. There is inter picture prediction coding as amethod for using the redundancy in temporal direction. In the interpicture prediction coding, a temporary preceding picture or a temporarysubsequent picture is used as a reference picture when a picture iscoded. Then, motion amount is detected from the reference picture andthe amount of information is compressed by removing redundancy inspatial direction toward a difference value between a picture to whichmotion compensation is performed and a picture to be coded.

In such a moving picture coding method, a picture that does not performinter picture prediction coding, or equivalently, that performs intrapicture prediction coding is called an I picture. Now, a picture meansone unit of coding including both of a frame and a field. Additionally,a picture that performs the inter picture prediction coding withreference to one previously processed picture is called a P picturewhile a picture that performs the inter picture prediction coding withreference to two previously processed picture is called a B picture.

As for a B picture, its pixel values are predicted (also called“weighted prediction”) and its motion vector is calculated based on tworeference pictures and by scaling processing (a proportional calculationbased on the distances among the B picture and the two referencepictures). As the distances among the pictures, there are a differencein time information that the pictures have, a difference in picturenumbers assigned to each picture, and a difference in informationshowing the display order of pictures.

FIG. 1 shows an example of prior art that indicates process forcalculating predictive pixel values in a B picture by weightedprediction based on two reference pictures. As shown in the figure, apredictive pixel value P is determined by weighted addition using thepixel values PO and P1 of two reference picture blocks 1 and 2. Both ofweighting coefficients a and b in the formula are, for example, ½.

FIG. 2 and FIG. 3 show other examples that indicate the process forcalculating predictive pixel values in a B picture (a block to be coded)by performing scaling based on two reference pictures (blocks 1 and 2)(for example, refer to Joint Video Team (JTV) of ISO/IEC MPEG and ITU-TVCEG Joint Committee Draft 2002 May 10, JVT-C167 11). Here, FIG. 2 showsan example when a B picture (a block to be coded) refers to a forwardpicture (block 1) and a backward picture (block 2) while FIG. 3 shows anexample when a B picture (a block to be coded) refers to two forwardpictures (blocks 1 and 2). By the way, W0 and W1 in the figures areweighting coefficients in scaling processing (here, weighted predictionof a pixel value). W0 is a weighting coefficient by which the pixelvalue in the block 1 is multiplied while W1 is a weighting coefficientby which the pixel value in the block 2 is multiplied. W0 and W1 areexpressed by the following formulas.

W0=(128×(T1−T))/(T1−T0)  (Formula 1)

W1=(128×(T−T0))/(T1−T0)  (Formula 2)

Here, T, T0, and T1 are time (such as a time stamp) added to the blockto be coded, the forward reference block 1 and the backward referenceblock 2, respectively.

At this time, the pixel value P in the block to be coded is expressed bythe following formula.

P=(P0×W0+P1×W1+64)>>7  (Formula 3)

Here, “>>” means a bit sift to the right direction. In other words,“>>7” means “÷(2 to the 7th power)”. In addition, the above-mentionedFormula 3 is used when the pixel value indicates the value of aluminance signal. When the pixel value indicates the value ofchrominance, the chrominance is expressed by the following formula.

P=128+((P0−128)×W0+(P1−128)×W1+64)>>7  (Formula 4)

FIG. 4 is a flowchart showing concrete calculation steps using theseformulas. After Time T, T1 and T0 and pixel values P0 and P1 areobtained (Step S401), whether Time T1 is equal to Time 0, in otherwords, whether the denominator of the weighting coefficients W0 and W1in Formulas 1 and 2 is 0 or not is judged (Step S402). When thedenominator is 0 (Yes; Step S402), it is determined that the weightingcoefficients W0 and W1 are both 128 (Step S403). When the denominator isnot 0 (No; Step 402), the weighting coefficients W0 and W1 arecalculated according to above-mentioned Formulas 1 and 2 (Step S404).Lastly, the predictive pixel value P in the block to be coded iscalculated using the weighting coefficients W0 and W1 and the pixelvalue P0 in the reference block 1 and the pixel value P1 in thereference block 2 according to above-mentioned Formula 3 or Formula 4(Step S405). As described above, the predictive pixel value in the blockto be coded is calculated using the pixel values in the two referenceblocks and performing temporal scaling.

Incidentally, in temporal scaling processing like this, divisions arenecessary to calculate weighting coefficients as above-mentionedFormulas 1 and 2 show. Since the resource necessary for divisions islarger than that necessary for multiplications, it is common tocalculate reciprocals of divisions in advance, store them in a look-uptable and the like and perform multiplications using the reciprocals instead of performing divisions.

Note that the block 1 and the block 2 in FIGS. 1 to 3 are P pictures butit is acceptable that the blocks are I pictures or B pictures and arenot necessarily P pictures.

In the method using the reciprocals calculated in advance, however, whenthe kinds of divisions in formulas for calculating weightingcoefficients are many, the kinds of reciprocals calculated in advancealso become many. For example, when possible values of T0 and T1 shownin Formulas 1 and 2 are 30 ways, respectively, by a simple calculation,900 ways of divisions are necessary for calculating reciprocals and thereciprocal calculation amount becomes extremely large. Further, there isanother problem that large storage capacity of the look-up table and thelike that store the reciprocals is necessary.

Moreover, when the denominators (the devisors of the weightingcoefficients) in above-mentioned Formulas 1 and 2 become small, theweighting coefficients (the quotients) become extremely large and thereis a problem, for example, that the predictive pixel values cross avalue that can be expressed by 16 bits. Therefore, for example, a 32-bitcalculation becomes necessary and since the significant digit numbernecessary for the calculations increases, the size of a calculationapparatus becomes large.

DISCLOSURE OF INVENTION

In view of the foregoing, it is an object of the present invention toprovide a moving picture prediction method and the like that enable thestorage capacity of the memory to be small in a prediction of a movingpicture by temporal scaling processing and when the reciprocals of thedivisors used there are calculated in advance and are stored in memory.

Additionally, it is another object of this invention to provide a movingpicture prediction method and the like that enable the calculations inthe prediction of a moving picture by the temporal scaling processing tobe a small size without increasing the significant digit numbernecessary for the calculations.

To achieve the above-mentioned objectives, the moving picture predictionmethod according to the present invention is a moving picture predictionmethod for predicting pixel values in a picture that forms a movingpicture based on pixel values in two reference pictures, the methodcomprising: a first parameter calculation step of calculating a firstparameter corresponding to a distance between a current picture and afirst reference picture; a second parameter calculation step ofcalculating a second parameter corresponding to a distance between thefirst reference picture and a second reference picture; a first judgmentstep of judging whether a third parameter calculated based on the firstand the second parameters is included in a predetermined range or not; afirst prediction step of calculating pixel values in the current pictureby scaling based on the first and the second parameters and pixel valuesin the first and the second reference pictures when a result of thejudgment in the first judgment step shows that the third parameter isincluded in the predetermined range; and a second prediction step ofcalculating pixel values in the current picture by scaling based onpredetermined values and pixel values in the first and the secondreference pictures when a result of the judgment in the first judgmentstep shows that the third parameter is not included in the predeterminedrange.

Here, the scaling processing is the processing for obtaining eachweighting coefficient when the pixel value in a current picture iscalculated from the pixel values in two reference pictures.

Hereby, a limit is put on the third parameter that is one of the valuesof the weighting coefficients in the scaling processing. When theweighting coefficients are within a predetermined range, the scalingprocessing is performed using the weighting coefficients but when theweighting coefficients are out of the predetermined range, the weightingcoefficients are made to be predetermined values and the scalingprocessing using the weighting coefficients is performed. Therefore,when the pixel value in a current picture, it is always possible tocalculate with a predetermined significant bit number.

Moreover, it is preferable that the moving picture prediction methodaccording to Claim 1 further comprising: a second judgment step ofjudging whether the first parameter is included in a predetermined rangeor not, wherein the second prediction step is executed when a result ofthe judgment in the second judgment step shows that the first parameteris not included in the predetermined range.

Hereby, a limit is put on the first parameter that is the value of adivisor in the scaling processing. When the divisor is within apredetermined range, the processing described above is performed furtherjudging whether the weighting coefficient identified by the divisor isincluded in the predetermined range. On the other hand, when the divisorcrosses the predetermined range, the scaling processing is performedwith a predetermined value as the weighting coefficient. Therefore, whenthe pixel value in a current picture is determined, the calculationamount for calculating and the memory amount for storing the reciprocalsof the devisors are limited to be small.

Furthermore, the moving picture prediction method according to Claim 1further comprising: a third judgment step of judging whether the secondparameter is included in a predetermined range or not, wherein thesecond prediction step is executed when a result of the judgment in thethird judgment step shows that the second parameter is not included inthe predetermined range.

Hereby, a limit is put on the second parameter that is the value of amultiplier in the scaling processing. When the multiplier is within apredetermined range, the processing described above is performed furtherjudging whether the weighting coefficient identified by the multiplieris included in the predetermined range or not. On the other hand, whenthe multiplier crosses the predetermined range, the scaling processingis performed with a predetermined value as the weighting coefficient.Therefore, when the pixel value in a current picture is determined, thecalculation amount for calculating the reciprocals of the multipliers islimited to be small.

In addition, the present invention can be realized not only as themotion vector prediction method like this but also as a motion vectorprediction apparatus using the steps included in the moving pictureprediction method like this as means, moving picture coding method andapparatus as well as moving picture decoding method and apparatus, and aprogram for causing a computer to execute these steps. Then, the programlike this, needless to say, can be distributed through a recoding mediumsuch as a CD-ROM and a transmission medium such as Internet.

As is apparent from the above explanation, the moving vector predictionmethod according to the present invention makes the scaling processingusing two reference pictures more efficient. Hereby, the calculationamount and the storage capacity accompanying the scaling processing arereduced.

In other words, the memory size of the look-up table and the like isreduced. The look-up table stores the number of the reciprocalcalculations and the reciprocals required to avoid the divisions forcalculating the weighting coefficients in generation of predictive pixelvalues and motion vectors. Furthermore, the scaling processing isperformed with a predetermined significant bit number (16 bits, forexample), enlargement of a circuit size is avoided.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram showing an example of prior art indicating a processfor calculating predictive pixel values in a B picture with the weightedprediction based on two reference pictures.

FIG. 2 is a diagram showing an example when a B picture (a block to becoded) refers to a forward picture (block 1) and a backward picture(block 2).

FIG. 3 is a diagram showing an example when a B picture (a block to becoded) refers to two forward pictures (blocks 1 and 2).

FIG. 4 is a flowchart showing the steps of a conventional weightedprediction.

FIG. 5 is a block diagram showing the structure of the moving picturecoding apparatus according to one embodiment using the moving pictureprediction method according to the present invention.

FIG. 6 is a flowchart showing processing steps of a weighted predictionby the motion compensation coding unit in FIG. 5.

FIG. 7 is a flowchart showing significant processing steps of a sizereduction of the look-up table required to avoid divisions to calculatethe weighting coefficients.

FIGS. 8A and 8B are flowcharts showing concrete examples of the judgmentprocessing (Step S70) in FIG. 7.

FIG. 9 is a flowchart showing processing steps of performing theweighted prediction with a predetermined significant bit number.

FIGS. 10A and 10B are flowcharts showing concrete examples of thejudgment processing (Step S90) in FIG. 9.

FIG. 11 is a block diagram showing the structure of the moving picturedecoding apparatus according to one embodiment using the moving pictureprediction method according to the present invention.

FIGS. 12A, 12B and 12C are illustrations for realizing the movingpicture prediction method, the moving picture coding/decoding methodusing a flexible disk that stores a program for realizing the structureof the moving picture coding apparatus or the moving picture decodingapparatus.

FIG. 13 is a block diagram showing an overall configuration of a contentsupply system for realizing content distribution service.

FIG. 14 is a diagram showing the cell phone using the moving pictureprediction method, the moving picture coding apparatus and the movingpicture decoding apparatus according to the present invention.

FIG. 15 is a block diagram showing the structure of the cell phoneaccording to the present invention.

FIG. 16 is a block diagram showing an overall configuration of a digitalbroadcasting system according to the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

The moving picture prediction method according to the presentembodiments of the present invention will be explained in detail belowwith reference to the figures.

The First Embodiment

FIG. 5 is a block diagram showing the structure of the moving picturecoding apparatus according to one embodiment using the moving pictureprediction method according to the present invention.

The moving picture coding apparatus includes picture memory 101, apredictive residual coding unit 102, a bit stream generation unit 103, apredictive residual decoding unit 104, picture memory 105, a motionvector estimation unit 106, a motion compensation coding unit 107, amotion vector storage unit 108, a difference calculation unit 110, anaddition calculation unit 111, a switch 112 and a switch 113.

The picture memory 101 stores moving pictures inputtedpicture-by-picture basis in display order. The motion vector estimationunit 106 uses coded decoding picture data as a reference picture andperforms estimation of a motion vector that shows the position predictedto be optimum in the research area in the picture.

The motion compensation coding unit 107 determines a coding mode of ablock using a motion vector estimated by the motion vector estimationunit 106 and generates predictive picture data (predictive pixel values)based on this coding mode. For example, in the case of an inter picturepredictive coding mode using two reference pictures, the motioncompensation coding unit 107 obtains pixel values in two referenceblocks from the two reference pictures using the motion vector estimatedby the motion vector estimation unit 106 and generates predictivepicture data. In other words, a weighted prediction of a pixel value isperformed by characteristic scaling processing according to the presentinvention and the pixel value in the block to be processed form thepixel values in the two reference blocks. Furthermore, the motioncompensation coding unit 107 has a look-up table that associates andstores the value corresponding to the distance between a first referencepicture and a second reference picture (a value limited to apredetermined range), and its reciprocal. The motion compensation codingunit 107 performs the scaling processing with reference to this look-uptable.

The motion vector storage unit 108 stores motion vectors estimated bythe motion vector estimation unit 106. The motion vectors stored in thismotion vector storage unit 108 are referred to, for example, in the caseof a temporal direct mode that predicts a motion vector of a block to beprocessed by performing the scale processing to a motion vector that areference picture has. The difference calculation unit 110 performs acalculation on the difference between picture data read out by thepicture memory 101 and predictive picture data inputted from the motioncompensation coding unit 107 and generates predictive residual picturedata.

The predictive residual coding unit 102 performs coding processing suchas frequency conversion and quantization to inputted predictive residualpicture data and generates coded data. The bit stream generation unit103 performs variable length coding and the like to inputted coded dataand generates a bit stream by adding information on a motion vector anda coding mode inputted from the motion compensation coding unit 107.

The predictive residual decoding unit 104 performs decoding processingsuch as frequency inversion and inverse quantization to inputted codeddata and generates decoded difference picture data. The additioncalculation unit 111 adds decoded difference picture data inputted fromthe predictive residual decoding unit 104 and predictive picture datainputted from the motion compensation coding unit 107 together andgenerates decoded picture data. The picture memory 105 stores generateddecoded picture data.

Next, a characteristic operation of the moving picture coding apparatusconstructed as described above is explained. Here, generation of apredictive pixel value in a B picture by the motion compensation codingunit 107 or weighted prediction is explained as an example referring toFIGS. 2 and 3.

The motion compensation coding unit 107 calculates predictive pixelvalues in a block to be coded based on the following formula.

P=P0+((P1−P0)×BWD)LWD  Formula 5

Here, BWD and LWD are values identified by the following Formulas 6 to9.

BWD0=((T−T0)<<7)/(T1−T0)  Formula 6

Here, “<<” means a bit sift to the left direction. In other words, “<<7”means “×(2 to the 7th power).

LWD0=Ceil(log 2(1+(abs(BWD0)>>7))  Formula 7

Here, the function Ceil (x) is a function that rounds x to the integerthat is x or more and closest to x. The function abs(x) is a functionthat returns the absolute value of x.

BWD=BWD0>>LWD0  Formula 8

LWD=7−LWD0  Formula 9

By the way, as is shown in Formula 7, LWD0 also means the number of bitsof the integral value of abs (BWD0)>>7.

As is apparent from the above-mentioned formulas, in the presentembodiment, when a pixel value can be expressed by 8 bits,above-mentioned Formulas 6 to 9 are all 16-bit calculations. Therefore,it is guaranteed that the scaling processing shown in above-mentionedFormula 5 is performed within the range of the significant bit number of16 bits. In other words, weighting coefficients are limited byabove-mentioned Formula 8 so that the multiplications of above-mentionedFormula 5 do not cross the significant bit value of 16 bits. Hereby,weighted prediction of a B picture is always realized within thesignificant bit number of 16 bits. In addition, it is acceptable tocalculate BWD and LWD in advance and store them in a look-up table atthe starting time point of a picture or a slice to reduce processingamount.

Note that it is possible to apply another limitation besides the abovelimitation in the present embodiment to reduce the number ofcalculations to obtain weighting coefficients. The other limitation isthat when the reference picture of the block 1 is not the first picturein a second reference list (list 1), a default weight coefficient isused. Here, the first reference picture in the second reference list isthe reference picture to which an index 0 is added in the secondreference list.

Here, a reference list is a row of relative numbers (indices) toidentify reference pictures and a first reference list and a secondreference list are used to identify two pictures to which a B picturerefers. The first reference list is a reference list for the firstmotion vector and is usually used for forward prediction; the secondreference list is a reference list for the second motion vector and isusually used for backward prediction. An index with a small number isusually allocated to a reference picture that has large pixelcorrelation with a picture to be coded and the smallest number is 0.Additionally, the default values of the weighting coefficients arepreferably BWD=1 and LWD=1. But it is acceptable that when the value ofLWD0 is larger than 7, different default values, for example, BWD=1 andLWD=0 are configured.

FIG. 6 is a flowchart showing processing steps of the weightedprediction by the motion compensation coding unit 107. First, when P0,P1, T, T0 and T1 are obtained (Step S501), whether the reference pictureto which block 2 belongs is the first reference picture in the secondreference list (or the index 0 in the list 1) or not is judged (StepS502).

As a result, when the reference picture to which the block 2 belongs isnot the first reference picture in the second reference list (Step S502;No), the weighting coefficient is configured to be a first default value(Step S504). Here, “the weighting coefficient is configured to be afirst default value” means that BWD=1 and LWD=1.

On the other hand, when the reference picture to which the block 2belongs is the first reference picture in the reference list (Step S502;Yes), whether Time T1 and Time T2 are equal or not is judged (StepS503). As a result, when Time T1 and Time T0 are equal (Step S503; Yes),the weighting coefficient is configured to be a first default value(Step S504); when Time T1 and Time T0 are not equal (Step S503; No),BWD0 and LWD0 are calculated according to above-mentioned Formulas 6 and7 (Step S505).

Subsequently, whether LDW0 is larger than 7 or not is judged (StepS506). When it is larger than 7 (Step S506; Yes), the weightingcoefficient is configured to be a second default value (Step S507).Here, “the weighting coefficient is configured to be a second defaultvalue” means that BWD=1 and LWD=0. On the other hand, when LWD0 is 7 orless (Step S506; No), BWD and LWD are calculated according toabove-mentioned Formulas 8 and 9 (Step S508).

Then, using BWD and LWD determined as described above, the predictivepixel value P in the block to be coded is calculated according toabove-mentioned Formula 5 (Step S509).

In this way, when the above limitations (Steps S502, S503, S504, S506and S507) or certain conditions are met, fixing the weightingcoefficient to a predetermined value makes the number of calculationsand required memory size of the look-up table for the weightingcoefficients extremely smaller than was previously possible. Moreover,the required number of divisions equals to the value that subtracts onefrom the number of the weighting coefficients stored in the look-uptable. This is because the weighting coefficients of default values areused in the remaining part at the entry of the look-up table. In otherwords, only part of the weighting coefficients is determined by thecalculation.

By the way, the weighted prediction described above, needless to say,holds true not only when a pixel value indicates luminance but also whenthe pixel value indicates chrominance. For example, as for weightingcoefficients on chrominance of blocks in a B picture, predictive valuesof the chrominance can be calculated by applying the offset of 128 toFormula 5 similarly to Formula 3. Consequently, the calculation amountof scaling to pixel values of the chrominance is also reduced comparedwith conventional scaling.

As is described above, the moving picture coding apparatus according tothe present embodiment makes the scaling processing using two referenceblocks more efficient. The effect to reduce the calculation amount canbe applied, needless to say, not only to the moving picture codingapparatus but also to a moving picture decoding apparatus.

In addition, in the present embodiment, a method for realizing both of asize reduction of the look-up table required to avoid divisions tocalculate the weighting coefficients and performing the weightedprediction with a predetermined significant bit number (16 bits, forexample) at the same time is shown, but the present invention is notnecessarily limited to the method for realizing both of the effects atthe same time. Hereafter, the methods for realizing each of the sizereduction of the look-up table and the weighted prediction with apredetermined significant bit number individually are explained.

Furthermore, in the above description, the method for performing theweighted prediction with the predetermined significant bit number by thebit sifts is shown, but it is possible to use fixed values for BWD andLWD. Using the fixed values for BWD and LWD, the weighting coefficientsmay cross the significant bit number. In this instance, predeterminedweighting coefficients are used as explained below.

FIG. 7 is a flowchart showing significant processing steps of a sizereduction of the look-up table required to avoid divisions to calculatethe weighting coefficients.

First, the motion compensation coding unit 107 judges whether generationof predictive values corresponding to the values of Time T, T1 and T0 isnecessary or not on the occasion of the weighted prediction of a Bpicture shown in FIGS. 2 and 3 (Step S70). As a result, when the motioncompensation coding unit 107 judges the generation to be necessary (StepS70; Yes), it generates the predictive values corresponding to thevalues of Time T, T1 and T0 as usual according to above-mentionedFormulas 1 to 3 (Step S72). On the other hand, when the motioncompensation coding unit 107 judges the generation to be unnecessary(Step S70; No), it configures each of two weighting coefficients W0 andW1 to be ½ and generates the predictive values according toabove-mentioned Formula 3 (Step S71).

FIGS. 8A and 8B are flowcharts showing concrete examples of the judgmentprocessing (Step S70) in FIG. 7.

In FIG. 8A, according to whether the index of Time T1 (the index of thereference picture corresponding to Time T in the reference lists) is 0or not (Step S80), the motion compensation coding unit 107 switchesbetween generation of the predictive value using predetermined weightingcoefficients (W0=W1=½, for example) (Step S81) and generation of thepredictive value using Time T, T1, and T0 according to above-mentionedFormulas 1 to 3 (Step S82). Hereby, for example, since calculation ofthe weighting coefficients depending on time relationship is necessaryonly when the index of Time T1 is 0 is necessary, storing the weightingcoefficients corresponding to such cases only in the look-up tablereduces the table size compared with storing the weighting coefficientsfor all the occasions conventionally.

In FIG. 8B, according to whether the index of Time T1 (the index of thereference picture corresponding to Time T in the reference lists) is apredetermined value (2, for example) or less (Step S85), the motioncompensation coding unit 107 switches between generation of thepredictive value using predetermined weighting coefficients (W0=W1=½,for example) (Step S86) and generation of the predictive value usingTime T, T1 and T0 according to above-mentioned Formulas 1 to 3 (StepS87). Hereby, for example, since the calculation of the weightingcoefficients depending on time relationship is necessary only when theindex of a reference picture is the predetermined value or less, storingonly the weighting coefficients corresponding to such cases in thelook-up table reduces the table size compared with storing the weightingcoefficients for all the occasions conventionally.

FIG. 9 is a flowchart showing processing steps of performing theweighted prediction with a predetermined significant bit number.

First, the motion compensation coding unit 107 judges whether generationof predictive values corresponding to the values of Time T, T1 and T0with a predetermined significant bit number is possible or not on theoccasion of the weighted prediction of a B picture shown in FIGS. 2 and3 (Step S90).

As a result, when the motion compensation coding unit 107 judges thegeneration to be possible (Step S90; Yes), it generates the predictivevalues corresponding to the values of Time T, T1 and T0 as usualaccording to above-mentioned Formulas 1 to 3 (Step S92). On the otherhand, when the motion compensation coding unit 107 judges the generationto be impossible (Step S90; No), it configures each of two weightingcoefficients W0 and W1 to be ½ and generates the predictive valuesaccording to above-mentioned Formula 3 (Step S91).

FIGS. 10A and 10B are flowcharts showing concrete examples of thejudgment processing (Step S90) in FIG. 9.

FIG. 10A is a diagram showing a concrete example of the weightedprediction of a pixel value. Here, according to whether the differencebetween Time T1 and Time T (T1−T) is within a predetermined range (−2˜2,for example) or not (Step S100), the motion compensation coding unit 107switches between generation of the predictive value using predeterminedweighting coefficients (W0=W1=½, for example) (Step S101) and generationof the predictive value using Time T, T1, and T0 according toabove-mentioned Formulas 1 to 3 (Step S102). Hereby, in generation of apredictive pixel value, when the weighting coefficients cross apredetermined value, in other words, when it may transpire that theweighting coefficients cannot be expressed by a predetermined bitnumber, the weighting coefficients are configured to be predeterminedvalues (values expressed by the predetermined bit number), therefore theweighted prediction with a predetermined significant bit number isalways ensured.

FIG. 10B is a diagram showing a concrete example of the weightedprediction of a pixel value. Here, according to whether the differencebetween Time T1 and Time T0 (T1−T0) is within a predetermined range(−2˜2, for example) or not (Step S105), the motion compensation codingunit 107 switches between generation of the predictive value usingpredetermined weighting coefficients (W0=W1=½, for example) (Step S106)and generation of the predictive value using Time T, T1, and T0according to above-mentioned Formulas 1 to 3 (Step S107). Hereby, ingeneration of a predictive pixel value, when the weighting coefficientscross a predetermined value, in other words, when it may transpire thatthe weighting coefficients cannot be expressed by a predetermined bitnumber, the weighting coefficients are configured to be predeterminedvalues (values expressed by the predetermined bit number), therefore theweighted prediction with a predetermined significant bit number isalways ensured.

The Second Embodiment

Next, the moving picture decoding apparatus using the moving pictureprediction method according to the present invention is explained.

FIG. 11 is a block diagram showing the structure of the moving picturedecoding apparatus according to one embodiment using the moving pictureprediction method according to the present invention.

The moving picture decoding apparatus includes a bit stream analysisunit 201, a predictive residual decoding unit 202, picture memory 203, amotion compensation decoding unit 204, a motion vector storing unit 205,an addition calculation unit 207 and a switch 208.

The bit stream analysis unit 201 extracts various data such as codingmode information and motion vector information used at the time ofcoding from an inputted bit stream. The predictive residual decodingunit 202 performs decoding to inputted predictive residual coding dataand generates predictive residual picture data.

The motion compensation decoding unit 204 generates motion compensationpicture data based on coding mode information and motion vectorinformation at the time of coding. When a block to be decoded is codedin a inter picture prediction coding mode using two reference pictures,for example, the motion compensation decoding unit 204 obtains pixelvalues in two reference blocks from two reference pictures using amotion vector extracted by the bit stream analysis unit 201. In otherwords, the motion compensation decoding unit 204 performs the weightedprediction of the pixel values with the characteristic scalingprocessing according to the present invention and obtains the pixelvalue in a block to be processed form the pixel values in the tworeference blocks. Additionally, the motion compensation decoding unit204 has the look-up table that associates and stores the valuecorresponding to the distance between a first reference picture and asecond reference picture and its reciprocal. The motion compensationdecoding unit 204 performs the scaling processing with reference to thislook-up table.

The motion vector storing unit 205 stores motion vectors extracted bythe bit stream analysis unit 201. The motion vectors stored in themotion vector storing unit 205 are referred to, for example, when ablock to be decoded is coded in a temporal direct mode. The additioncalculation unit 207 adds predictive residual coding data inputted fromthe predictive residual decoding unit 202 and motion compensationpicture data inputted from the motion compensation decoding unit 204,and generates decoded picture data. The picture memory 203 stores thegenerated decoded picture data.

A characteristic operation of the moving picture decoding apparatusconstructed as described above, in other words, the weighted predictionby the motion compensation decoding unit 204 is explained.

The motion compensation decoding unit 204 has basically the similarfunctions to the motion compensation coding unit 107 included in themotion picture coding apparatus. For example, in the weighted predictionof a pixel value by the scaling processing, as is shown in FIG. 6, basedon the index value of Time T1 and the conformity between Time T1 andTime T0 (Steps S501˜5503), the motion compensation decoding unit 204configures default values to BWD and LWD (Steps S504, S507), identifiesBWD and LWD based on above-mentioned Formulas 6 to 9 (Step S508) andcalculates the predictive value in the block to be coded P usingidentified BWD and LWD based on above-mentioned Formula 5 (Step S509).

By the way, it is acceptable that the motion compensation decoding unit204 performs only significant processing for the size reduction of thelook-up table required to avoid divisions in the calculation of theweighting coefficients as shown in FIGS. 7 and 8. In other words, themotion compensation decoding unit 204 judges whether generation ofpredictive values corresponding to the values of Time T, T1 and T0 isnecessary or not on the occasion of the weighted prediction of a Bpicture shown in FIG. 2 or FIG. 3 (Step S70). As a result, when themotion compensation decoding unit 204 judges the generation to benecessary (Step S70; Yes), it generates the predictive valuescorresponding to the values of Time T, T1 and T0 as usual according toabove-mentioned Formulas 1 to 3 (Step S72). On the other hand, when themotion compensation decoding unit 204 judges the generation to beunnecessary (Step S70; No), it configures each of two weightingcoefficients W0 and W1 to be ½ and generates the predictive valuesaccording to above-mentioned Formula 3 (Step S71).

Hereby, since the calculation of the weighting coefficients depending ontime relationship is necessary only when generation of predictive valuescorresponding to Time T, T1 and T0 is necessary, storing the weightingcoefficients corresponding to such cases only in the look-up tablereduces the table size compared with storing the weighting coefficientsfor all the occasions conventionally.

Similarly, it is acceptable that the motion compensation decoding unit204 performs processing for the weighted prediction with a predeterminedsignificant bit number as shown in FIGS. 9 and 10. In other words, themotion compensation decoding unit 204 judges whether generation ofpredictive values corresponding to the values of Time T, T1 and T0 ispossible or not on the occasion of the weighted prediction of a Bpicture shown in FIGS. 2 and 3 (Step S90). As a result, when the motioncompensation decoding unit 204 judges the generation to be possible(Step S90; Yes), it generates the predictive values corresponding to thevalues of Time T, T1 and T0 as usual according to above-mentionedFormulas 1 to 3 (Step S92). On the other hand, when the motioncompensation decoding unit 204 judges the generation to be impossible(Step S90; No), it configures each of two weighting coefficients W0 andW1 to be ½ and generates the predictive values according toabove-mentioned Formula 3 (Step S91).

Hereby, when the weighted prediction cannot be performed with thepredetermined significant bit number using Time T, T1 and T0, in otherwords, when it transpires that the weighting coefficients cross apredetermined value and therefore cannot be expressed by thepredetermined bit number, the weighting coefficients are configured tobe predetermined values (values expressed by the predetermined bitnumber), therefore the weighted prediction with the predeterminedsignificant bit number is always ensured.

The Third Embodiment

Next, an example of realizing the moving picture prediction method, themoving picture coding apparatus and the moving picture decodingapparatus according to the present invention in another embodiment isexplained.

It is possible to easily perform the processing shown in the aboveembodiments in an independent computing system by recording a programfor realizing the structure of the picture coding apparatus or thepicture decoding apparatus shown in the above-mentioned embodiments ontothe storage medium such as a flexible disk.

FIG. 12 is an illustration for realizing the moving picture predictionmethod, the moving picture coding/decoding method using a flexible diskthat stores a program for realizing the structure of the moving picturecoding apparatus or the moving picture decoding apparatus.

FIG. 12B shows a full appearance of a flexible disk, its structure atcross section and the flexible disk itself whereas FIG. 12A shows anexample of a physical format of the flexible disk as a main body of astoring medium. A flexible disk FD is contained in a case F, a pluralityof tracks Tr are formed concentrically from the periphery to the insideon the surface of the disk, and each track is divided into 16 sectors Sein the angular direction. Therefore, as for the flexible disk storingthe above-mentioned program, data as the above-mentioned program isstored in an area assigned for it on the flexible disk FD.

FIG. 12C shows a structure for recording and reading out the program onthe flexible disk FD. When the program is recorded on the flexible diskFD, the computing system Cs writes in data as the program via a flexibledisk drive. When the moving picture coding apparatus or the movingpicture decoding apparatus is constructed in the computing system by theprogram on the flexible disk, the program is read out from the flexibledisk drive and then transferred to the computing system Cs.

The above explanation is made on an assumption that a storing medium isa flexible disk, but the same processing can also be performed using anoptical disk. In addition, the storing medium is not limited to aflexible disk and an optical disk, but any other medium such as an ICcard and a ROM cassette capable of recording a program can be used.

The following is an explanation of the applications of the movingpicture prediction method, the moving picture coding apparatus and themoving picture decoding apparatus as shown in the above-mentionedembodiments, and a system using them.

FIG. 13 is a block diagram showing an overall configuration of a contentsupply system ex100 for realizing content distribution service. The areafor providing communication service is divided into cells of desiredsize, and cell sites ex107 to ex110 which are fixed wireless stationsare placed in respective cells.

This content supply system ex100 is connected to devices such asInternet ex101, an Internet service provider ex102, a telephone networkex104, as well as a computer ex111, a PDA (Personal Digital Assistant)ex112, a camera ex113, a cell phone ex114 and a cell phone with a cameraex115 via the cell sites ex107 to ex110.

However, the content supply system ex100 is not limited to theconfiguration as shown in FIG. 13 and may be connected to a combinationof any of them. Also, each device may be connected directly to thetelephone network ex104, not through the cell sites ex107 to ex110.

The camera ex113 is a device capable of shooting video such as a digitalvideo camera. The cell phone ex114 may be a cell phone of any of thefollowing system: a PDC (Personal Digital Communications) system, a CDMA(Code Division Multiple Access) system, a W-CDMA (Wideband-Code DivisionMultiple Access) system or a GSM (Global System for MobileCommunications) system, a PHS (Personal Handyphone System) or the like.

A streaming server ex103 is connected to the camera ex113 via thetelephone network ex104 and also the cell site ex109, which realizes alive distribution or the like using the camera ex113 based on the codeddata transmitted from the user. Either the camera ex113 or the serverwhich transmits the data may code the data. Also, the picture data shotby a camera ex116 may be transmitted to the streaming server ex103 viathe computer ex111. In this case, either the camera ex116 or thecomputer ex111 may code the picture data. An LSI ex117 included in thecomputer ex111 or the camera ex116 actually performs coding processing.Software for coding and decoding moving pictures may be integrated intoany type of storage medium (such as a CD-ROM, a flexible disk and a harddisk) that is a recording medium which is readable by the computer ex111or the like. Furthermore, a cell phone with a camera ex115 may transmitthe picture data. This picture data is the data coded by the LSIincluded in the cell phone ex115.

The content supply system ex100 codes contents (such as a music livevideo) shot by a user using the camera ex113, the camera ex116 or thelike in the same way as shown in the above-mentioned embodiments andtransmits them to the streaming server ex103, while the streaming serverex103 makes stream distribution of the content data to the clients attheir requests. The clients include the computer ex111, the PDA ex112,the camera ex113, the cell phone ex114 and so on capable of decoding theabove-mentioned coded data. In the content supply system ex100, theclients can thus receive and reproduce the coded data, and can furtherreceive, decode and reproduce the data in real time so as to realizepersonal broadcasting.

When each device in this system performs coding or decoding, the movingpicture coding apparatus or the moving picture decoding apparatus shownin the above-mentioned embodiments can be used.

A cell phone will be explained as an example of the device.

FIG. 14 is a diagram showing the cell phone ex115 using the movingpicture prediction method, the moving picture coding apparatus and themoving picture decoding apparatus explained in the above-mentionedembodiments. The cell phone ex115 has an antenna ex201 for communicatingwith the cell site ex110 via radio waves, a camera unit ex203 such as aCCD camera capable of shooting moving and still pictures, a display unitex202 such as a liquid crystal display for displaying the data such asdecoded pictures and the like shot by the camera unit ex203 or receivedby the antenna ex201, a body unit including a set of operation keysex204, an audio output unit ex208 such as a speaker for outputtingaudio, an audio input unit ex205 such as a microphone for inputtingaudio, a storage medium ex207 for storing coded or decoded data such asdata of moving or still pictures shot by the camera, data of receivede-mails and that of moving or still pictures, and a slot unit ex206 forattaching the storage medium ex207 to the cell phone ex115. The storagemedium ex207 stores in itself a flash memory element, a kind of EEPROM(Electrically Erasable and Programmable Read Only Memory) that is anonvolatile memory electrically erasable from and rewritable to aplastic case such as an SD card.

Next, the cell phone ex115 will be explained with reference to FIG. 15.In the cell phone ex115, a main control unit ex311, designed in order tocontrol overall each unit of the main body which contains the displayunit ex202 as well as the operation keys ex204, is connected mutually toa power supply circuit unit ex310, an operation input control unitex304, a picture coding unit ex312, a camera interface unit ex303, anLCD (Liquid Crystal Display) control unit ex302, a picture decoding unitex309, a multiplexing/demultiplexing unit ex308, a read/write unitex307, a modem circuit unit ex306 and a audio processing unit ex305 viaa synchronous bus ex313.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex310 supplies respective units with powerfrom a battery pack so as to activate the camera attached digital cellphone ex115 as a ready state.

In the cell phone ex115, the audio processing unit ex305 converts theaudio signals received by the audio input unit ex205 in conversationmode into digital audio data under the control of the main control unitex311 including a CPU, ROM and RAM, the modem circuit unit ex306performs spread spectrum processing of the digital audio data, and thecommunication circuit unit ex301 performs digital-to-analog conversionand frequency conversion of the data, so as to transmit it via theantenna ex201. Also, in the cell phone ex115, the communication circuitunit ex301 amplifies the data received by the antenna ex201 inconversation mode and performs frequency conversion andanalog-to-digital conversion to the data, the modem circuit unit ex306performs inverse spread spectrum processing of the data, and the audioprocessing unit ex305 converts it into analog audio data, so as tooutput it via the audio output unit ex208.

Further, when transmitting an e-mail in data communication mode, thetext data of the e-mail inputted by operating the operation keys ex204of the main body is sent out to the main control unit ex311 via theoperation input control unit ex304. In the main control unit ex311,after the modem circuit unit ex306 performs spread spectrum processingof the text data and the communication circuit unit ex301 performsdigital-to-analog conversion and frequency conversion for the text data,the data is transmitted to the cell site ex110 via the antenna ex201.

When picture data is transmitted in data communication mode, the picturedata shot by the camera unit ex203 is supplied to the picture codingunit ex312 via the camera interface unit ex303. When it is nottransmitted, it is also possible to display the picture data shot by thecamera unit ex203 directly on the display unit ex202 via the camerainterface unit ex303 and the LCD control unit ex302.

The picture coding unit ex312, which includes the moving picture codingapparatus as explained in the present invention, compresses and codesthe picture data supplied from the camera unit ex203 by the codingmethod used for the moving picture coding apparatus as shown in theabove-mentioned embodiment so as to transform it into coded picturedata, and sends it out to the multiplexing/demultiplexing unit ex308. Atthis time, the cell phone ex115 sends out the audio received by theaudio input unit ex205 during the shooting with the camera unit ex203 tothe multiplexing/demultiplexing unit ex308 as digital audio data via theaudio processing unit ex305.

The multiplexing/demultiplexing unit ex308 multiplexes the coded picturedata supplied from the picture coding unit ex312 and the audio datasupplied from the audio processing unit ex305 using a predeterminedmethod, then the modem circuit unit ex306 performs spread spectrumprocessing of the multiplexed data obtained as a result of themultiplexing, and lastly the communication circuit unit ex301 performsdigital-to-analog conversion and frequency conversion of the data forthe transmission via the antenna ex201.

As for receiving data of a moving picture file that is linked to a Webpage or the like in data communication mode, the modem circuit unitex306 performs inverse spread spectrum processing of the data receivedfrom the cell site ex110 via the antenna ex201, and sends out themultiplexed data obtained as a result of the inverse spread spectrumprocessing.

In order to decode the multiplexed data received via the antenna ex201,the multiplexing/demultiplexing unit ex308 separates the multiplexeddata into a bit stream of picture data and that of audio data, andsupplies the coded picture data to the picture decoding unit ex309 andthe audio data to the audio processing unit ex305 respectively via thesynchronous bus ex313.

Next, the picture decoding unit ex309, including the moving picturedecoding apparatus as explained in the above-mentioned invention,decodes the bit stream of picture data using the decoding methodcorresponding to the coding method as shown in the above-mentionedembodiments to generate reproduced moving picture data, and suppliesthis data to the display unit ex202 via the LCD control unit ex302, andthus the picture data included in the moving picture file linked to aWeb page, for instance, is displayed. At the same time, the audioprocessing unit ex305 converts the audio data into analog audio data,and supplies this data to the audio output unit ex208, and thus theaudio data included in the moving picture file linked to a Web page, forinstance, is reproduced.

The present invention is not limited to the above-mentioned system assuch ground-based or satellite digital broadcasting has been in the newslately and at least either the moving picture coding apparatus or themoving picture decoding apparatus described in the above-mentionedembodiments can be incorporated into a digital broadcasting system asshown in FIG. 16. More specifically, a bit stream of video informationis transmitted from a broadcast station ex409 to or communicated with abroadcast satellite ex410 via radio waves. Upon receipt of it, thebroadcast satellite ex410 transmits radio waves for broadcasting. Then,a home-use antenna ex406 with a satellite broadcast reception functionreceives the radio waves, and a television (receiver) ex401 or a set topbox (STB) ex407 decodes the bit stream for reproduction. The movingpicture decoding apparatus as shown in the above-mentioned embodimentcan be implemented in the reproducing apparatus ex403 for reading outand decoding the bit stream recorded on a storage medium ex402 that is arecording medium such as CD and DVD. In this case, the reproduced videosignals are displayed on a monitor ex404. It is also conceivable toimplement the moving picture decoding apparatus in the set top box ex407connected to a cable ex405 for a cable television or the antenna ex406for satellite and/or ground-based broadcasting so as to reproduce themon a monitor ex408 of the television ex401. The moving picture decodingapparatus may be incorporated into the television, not in the set topbox. Also, a car ex412 having an antenna ex411 can receive signals fromthe satellite ex410 or the cell site ex107 for reproducing movingpictures on a display device such as a car navigation system ex413 setin the car ex412.

Further, the moving picture coding apparatus as shown in theabove-mentioned embodiments can code picture signals and record them ona recording medium. As a concrete example, a recorder ex420 such as aDVD recorder for recording picture signals on a DVD disk ex421, a diskrecorder for recording them on a hard disk can be cited. They can berecorded on an SD card ex422. If the recorder ex420 includes the movingpicture decoding apparatus as shown in the above-mentioned embodiment,the picture signals recorded on the DVD disk ex421 or the SD card ex422can be reproduced for display on the monitor ex408.

As for the structure of the car navigation system ex413, the structurewithout the camera unit ex203, the camera interface unit ex303 and thepicture coding unit ex312, out of the components shown in FIG. 15, isconceivable. The same applies for the computer ex111, the television(receiver) ex401 and others.

In addition, three types of implementations can be conceived for aterminal such as the above-mentioned cell phone ex114; asending/receiving terminal implemented with both an encoder and adecoder, a sending terminal implemented with an encoder only, and areceiving terminal implemented with a decoder only.

As described above, it is possible to use the moving picture predictionmethod, the moving picture coding apparatus and the moving picturedecoding apparatus described in the above-mentioned embodiments for anyof the above-mentioned devices and systems, and by using this method,the effects described in the above-mentioned embodiments can beobtained.

Up to this point, the moving picture prediction method, the movingpicture coding apparatus and the moving picture decoding apparatusaccording to the present invention are explained based on the embodimentbut the present invention is not limited to this embodiment.

For example, the judgment in FIG. 7 (the judgment about whethergeneration of the predictive values corresponding to T, T1 and T0 isnecessary or not; Step S70) and the judgment in FIG. 9 (the judgmentabout whether generation of the predictive values with predeterminedsignificant bits corresponding to T, T1 and T0 is possible or not; StepS90) are not limited to the values of the divisors (the values of thedenominators) of the formulas to calculate the weighting coefficients W0and W1 shown in the above Formulas 1 and 2. It is acceptable to judgewith the values of the multipliers (the values of the numerators) or thevalues of the weighting coefficients W0 and W1. Further it is alsoacceptable to judge with the values of each pixel value in two referencepictures multiplied by the weighting coefficients W0 and W1.

INDUSTRIAL APPLICABILITY

The moving picture prediction method, the moving picture coding methodand the moving picture decoding method according to the presentinvention are useful as the methods for generating prediction values,generating bit streams by coding each picture that constructs a movingpicture, and decoding the generated bit streams with a cell phone, a DVDapparatus, a personal computer and the like.

1. A picture coding and decoding system which includes a picture codingapparatus that codes a picture on a block basis and a picture decodingapparatus that decodes a coded picture on a block basis, wherein saidpicture coding apparatus includes: a first and second parameterscalculation unit configured to: calculate a first parametercorresponding to a distance between an input picture to be coded and afirst reference picture referred to by a current block to be coded thatis included in the input picture, and calculate a second parametercorresponding to a distance between the first reference picture and asecond reference picture referred to by the current block to be coded; afirst judgment unit configured to judge whether or not a value of athird parameter calculated based on a ratio between the first parameterand the second parameter is included in a predetermined range; a firstpredictive pixel value calculation unit configured to: calculate apredictive pixel value of the current block to be coded by scaling apixel value of the first reference picture using one of two weightingcoefficients and scaling a pixel value of the second reference pictureusing the other of the two weighting coefficients, the two weightingcoefficients being calculated using the first and second parameters,when the value of the third parameter is included in the predeterminedrange, and calculate a predictive pixel value of the current block to becoded by scaling a pixel value of the first reference picture and apixel value of the second reference picture using two weightingcoefficients, the two weighting coefficients having a same predeterminedvalue, when the value of the third parameter is not included in thepredetermined range; a difference value coding unit configured to code adifference value between a pixel value of the current block and thecalculated predictive pixel value of the current block to output codeddata of the current block, wherein said picture decoding apparatusincludes: a first parameter calculation unit configured to calculate afirst parameter corresponding to a distance between a current picture tobe decoded and a first reference picture referred to by a current blockto be decoded that is included in the current picture to be decoded; asecond parameter calculation unit configured to calculate a secondparameter corresponding to a distance between the first referencepicture and a second reference picture referred to by the current blockto be decoded; a second judgment unit configured to judge whether or nota value of a third parameter calculated based on a ratio between thefirst parameter and the second parameter is included in a predeterminedrange; a predictive pixel value generation unit configured to: calculatea predictive pixel value of the current block to be decoded by scaling apixel value of the first reference pictures using one of two weightingcoefficients and scaling a pixel value of the second reference pictureusing the other of the two weighting coefficients, the two weightingcoefficients being calculated using the first and second parameters,when the value of the third parameter is included in the predeterminedrange, and calculate a predictive pixel value of the current block to bedecoded by scaling a pixel value of the first reference picture and apixel value of the second reference picture using two weightingcoefficients, the two weighting coefficients having a same predeterminedvalue, when the value of the third parameter is not included in thepredetermined range; a difference value decoding unit configured todecode coded data of the current block to be decoded to obtain a decodeddifference value of the current block to be decoded; and a blockreconstructing unit configured to reconstruct a pixel value of thecurrent block by adding the decoded difference value of the currentblock and the predictive pixel value of the current block calculated bysaid predictive pixel value generation unit.
 2. The picture coding anddecoding system according to claim 1, wherein each of the distancebetween the input picture to be coded and the first reference picture,the distance between the first reference picture and the secondreference picture, the distance between the current picture to bedecoded and the first reference picture, and the distance between thefirst reference picture and the second reference picture is a temporaldistance.